home *** CD-ROM | disk | FTP | other *** search
/ L' Effet Pommier 3 / L'Effet Pommier - Volume 03.iso / Utils□□□ Divers 2 / MacCurveFit 1.2 / MacCurveFit Tuts / MacCurveFit Tuts.rsrc / TEXT_130.txt < prev    next >
Text File  |  1995-09-02  |  3KB  |  127 lines

  1. Tutorial 3.
  2.  
  3. This tutorial demonstrates the simultaneous fitting feature.  Start up MacCurveFit and open the file ΓÇ£Simultaneous DataΓÇ¥ (in the examples folder).  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24. The window contains data for a somewhat contrived chemical reaction where a reactant is converted to a product in a unimolecular process thus exhibiting first order kinetics.  My apologies to those who are not interested chemistry.  The first column contains times since the reaction started, the second and third columns hold the concentrations of the reactant and product respectively.  The reference to first order kinetics means that the reaction behaves as described below:
  25.  
  26. -d[reactant]/dt = d[product]/dt = k[reactant]
  27.  
  28. Hence the reactant and product concentrations can be calculated as:
  29.  
  30. [reactant] = a*exp(-b*x)
  31. [product] = a*(1-exp(-b*x)
  32.  
  33. where a is the initial concentration of the reactant, b is the rate constant (k) and x is the time.
  34.  
  35. Open the file Simultaneous Plot and a window will appear showing reactant and product concentrations against time.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. The curve fit window will show the above equations describing the concentrations versus time.  The solution to the fitting exercise should have the same value of coefficient 'a' in both equations and the same value of coefficient 'b'.  This constraint can be applied by selecting Simultaneous Fit from the Fit menu.  The simultaneous fitting mode uses a common set of coefficients for all equations and the total sum of squared errors is calculated as ΓêæSSE in the fit window.  Clicking on the Fit button will perform the simultaneous fitting operation giving the following results.
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112. The simultaneous mode can then be switched off by  unchecking the Simultaneous Fit item in the Fit menu.  The fit window then displays the individual SSE and R2 values for each data set.  In this case the individual fits have the following values.
  113.  
  114. [reactant] fit:
  115.  
  116. SSE = 0.00323
  117. R2 = 0.99122
  118.  
  119. [product] fit:
  120.  
  121. SSE = 0.00380
  122. R2 = 0.98736
  123.  
  124. Finally I'll comment on the errors for the fit.  The errors shown immediately after the fit, while the simultaneous mode is on, are the proper errors for that type of fit.  When the simultaneous mode is switched off the errors will be cleared, recalculating the errors will give slightly different values.  This is because the recalculated errors are for the individual fit and the coefficients do not correspond to the best fit for that single data set.  The errors quoted should be the errors determined by the simultaneous fitting operation.
  125.  
  126. Well that covers the general usage of MacCurveFit.  You can now start to do some curve fitting of the own, which IΓÇÖm sure youΓÇÖll find far more interesting.
  127.